<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>鼠标悬浮线条动态变化</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
            transition: .5s;
        }

        html,
        body {
            background-color: #fff;
            font-size: 14px;
        }

        .app {
            width: 100%;
            height: 100vh;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        a {
            text-decoration: none;
            color: green;
            cursor: pointer;
            font-size: 34px;
            font-weight: bold;
        }

        .a-line {
            width: 0;
            height: 2px;
            display: block;
            margin-bottom: 6px;
            background-color: green;
        }

        a:hover .a-line {
            width: 100%;
            animation: move .5s ease;
        }

        @keyframes move {
            from {
                width: 0;
            }

            to {
                width: 100%;
            }
        }
    </style>
</head>

<body>
    <div class="app">
        <a href="javascript:;">
            <span class="a-line"></span>
            Design
        </a>
    </div>
</body>

</html>